package remato.client.view.util;

import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;

import remato.client.controller.Registry;
import remato.client.controller.RequirementPlugin;
import remato.client.model.ClientModelItem;

/**
 * @author petterei
 *
 * @version $Id: ModelHyperLinkAdapter.java,v 1.2 2006-02-06 09:29:08 petterei Exp $
 */
public class ModelHyperLinkAdapter extends HyperlinkAdapter {
		private ClientModelItem item = null;
		@Override
		public void linkActivated(@SuppressWarnings("unused") HyperlinkEvent e) {
			if (null != item) {
				RequirementPlugin.getInstance().getEditorWindowManager().startEditorPart(Registry.MODEL_EDITOR, item);
			}
		}
		public void setItem(ClientModelItem item) {
			this.item = item;
		}
}
